introduce GNTTABOP_cache_flush
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 23 Oct 2014 10:06:11 +0000 (12:06 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 23 Oct 2014 10:06:11 +0000 (12:06 +0200)
commit18e8d22fe750c8c7b2830fa37961352693425cf1
tree101ae4e290a2cd168080a08cfc144b035887d672
parentf62dc81c2df7778e1b5a2b7282fc3dc8e5ebf455
introduce GNTTABOP_cache_flush

Introduce a new hypercall to perform cache maintenance operation on
behalf of the guest. The argument is a machine address and a size. The
implementation checks that the memory range is owned by the guest or the
guest has been granted access to it by another domain.

Introduce grant_map_exists: an internal grant table function to check
whether an mfn has been granted to a given domain on a target grant
table. Check hypercall_preempt_check() every 4096 iterations in the
implementation of grant_map_exists.
Use the top 20 bits of the GNTTABOP cmd encoding to save the last ref
across the hypercall continuation.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/common/compat/grant_table.c
xen/common/grant_table.c
xen/include/public/grant_table.h
xen/include/xlat.lst